package com.aptemo.webetek.client.utils;

import java.util.Comparator;

import com.aptemo.webetek.shared.UserBean;

public class WonComparator
		extends SortingComparator implements Comparator<UserBean>
{

	public WonComparator(boolean ascending)
	{
		super(ascending);
	}

	@Override
	public int compare(UserBean o1, UserBean o2)
	{
		// if (o1.getStatistics() == null)
		// {
		// return factor;
		// }
		// if (o2.getStatistics() == null)
		// {
		// return -factor;
		// }
		return factor * Double.compare(o1.getWonBetCnt(), o2.getWonBetCnt());
	}
}
